/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controller.admin;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

/**
 *
 * @author kydrenw
 */
public class TuyChinhController implements Controller {

    @Override
    public ModelAndView handleRequest(HttpServletRequest hsr, HttpServletResponse hsr1) throws Exception {

        if (hsr.getSession().getAttribute("quyen") == null) {
            hsr1.sendRedirect("admin.htm");
            return null;
        }

        hsr.setAttribute("tag", "tuychinh");
        hsr1.setCharacterEncoding("UTF-8");

        return new ModelAndView("admin/index");
    }
}
